Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Printing Extensions and Drivers /
Chapter 4 - Printing Messages / Printing Messages Reference
Printing Messages / Spooling Messages


GXSpoolData

QuickDraw GX sends the GXSpoolData message whenever a stream of data is about to be written to the spool file. You can override the GXSpoolData message to modify data going into the spool file or to spool data in your own way. Your override of the GXSpoolData message must match the following formal declaration:

OSErr MySpoolData (gxSpoolFile aSpoolFile, Ptr data, 
                  long *length);
aSpoolFile
The spool file to which the data is written.
data
A pointer to the buffer containing the data.
length
On entry, the length of the buffer in bytes. On return, the actual number of bytes that were spooled.
function result
An error code. The value noErr indicates that the operation was successful.
DESCRIPTION
QuickDraw GX sends the GXSpoolData message during spooling when a stream of data is about to be written to the spool file.

One reason to override this message is to encrypt the data in the spool file. If you do change the data in the spool file with an override of the GXSpoolData message, you must do so prior to forwarding the message.

The default implementation of the GXSpoolData message stores the data into the spool file. In most cases, you forward the GXSpoolData message after making your data changes and let the default implementation write the data bytes.

SPECIAL CONSIDERATIONS
You rarely send the GXSpoolData message yourself.

If you are providing your own spooling, you need to totally override the GXSpoolData message and all of the other spooling and despooling messages.

If you are not providing your own spooling, you must forward the GXSpoolData message to allow the default implementation to write the data into the spool file.

RESULT CODES
gxSegmentLoadFailedErrA required code segment could not be found,
or there was not enough memory to load it.
gxPrUserAbortErrThe user has canceled printing.

Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996




Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help